<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script>
        let p1 = Promise.resolve('aaa');
        let p2 = Promise.reject('bbb');
        let p3 = Promise.resolve('ccc');

        Promise.all([p1,p2,p3]).then(res=>{
            console.log(res);
        }).catch(err=>{
            console.log(err);
        });

        Promise.race([p1,p2,p3]).then(res=>{
            console.log(res);
        }).catch(err=>{
            console.log(err);
        });
    </script>
</head>
<body>
    
</body>
</html>